package com.free4k.hss.config;

//Jackson简易使用
public class JsonResult {

/*    ObjectMapper mapper = new ObjectMapper();

    对象转Json
    User user = new User("张三", 25);
    String json = mapper.writeValueAsString(user);

    Json转对象
    User user = mapper.readValue(json, User.class);

    Json字符串创建方式1
    ObjectMapper mapper = new ObjectMapper();
    ObjectNode json = mapper.createObjectNode();

    Json字符串创建方式2
    ObjectNode json = JsonNodeFactory.instance.objectNode();

    json.put("k","v");
*/

}
